import { http, toast} from '@/uni_modules/uview-plus'

// 默认用户登录
export const login = (params, config = { custom: { auth: false }}) => http.post('/loginByPassword', params, config)
// 文章列表  1通知 2政策 3新闻 4老年服务 5热门资讯
export const noticeList = (params) => http.get('/yanglao/notice/list',{params, custom: { auth: true }})
// 文章详情
export const noticeDetail = (params) => http.get('/yanglao/notice/' + params,{ custom: { auth: true }})
// 字典数据
export const getDicts = (dictType) => http.get('/system/dict/data/type/' + dictType,{ custom: { auth: true }})
// 图片
export const pictureList = (params) => http.get('/yanglao/picture/list',{params, custom: { auth: true }})
// 视频
export const videoList = (params) => http.get('/yanglao/video/list',{params, custom: { auth: true }})
// 老年养生
export const oldHealthList = (params) => http.get('/yanglao/oldHealth/list',{params, custom: { auth: true }})
// 老年养生详情
export const oldHealthDetail = (params) => http.get('/yanglao/oldHealth/'+ params, { custom: { auth: true }})
// 机构
export const organList = (params) => http.get('/yanglao/retirementOrganize/list',{params, custom: { auth: true }})
// 机构详情
export const organDetail = (params) => http.get('/yanglao/retirementOrganize/' + params,{ custom: { auth: true }})

// get请求，获取菜单，注意：get请求的配置等，都在第二个参数中，详见前面解释
export const getMenu = (data) => http.get('/ebapi/public_api/index', data)